//
//  UIImageView+Extension.m
//  百思不得姐
//
//  Created by qianfeng on 16/3/8.
//  Copyright © 2016年 高炜. All rights reserved.
//

#import "UIImageView+Extension.h"
#import <UIImageView+WebCache.h>
@implementation UIImageView (Extension)
-(void)showHeaderViewWithIcon:(NSString *)icon
{
    UIImage *placeholder =[[UIImage imageNamed:@"defaultUserIcon"] cycleImage];
    [self sd_setImageWithURL:[NSURL URLWithString:icon] placeholderImage:placeholder completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        self.image =image?[image cycleImage]:placeholder;
    }];
}
@end
